YYREF

Section: User Commands (1)
Updated: LOCAL
Index Return to Main Contents
 

NAME

yyref - generate cross-reference for YACC input  

SYNOPSIS

yyref [ < inputfile ]  

DESCRIPTION

Yyref generates cross-references for yacc(1) input files. It reads source from standard input, and upon EOF or seeing the second %% that marks the end of the rules portion, generates a cross-reference list of all parser tokens.

In case of syntax errors in the input, yyref tries to generate as much information as it can.

The output consists of a number listing of the header and rules part, followed by the cross-reference:

   1 :  %{
   2 :  # include <ctype.h>
   3 :  %}
   4 :  
   5 :  
   6 :          /*******************************************************   7 :          *       *
   8 :          *       Date : Fri Jul  4 00:50:04 BST 1986             *
   9 :          *                                                       *
  10 :          *****************************************************/
  11 :  
  12 :  %token  IDENTIFIER START_TOKEN NUMBER
  13 :  
  14 :  %start  small
  15 :  
  16 :  %%
  17 :  
  18 :  small
  19 :          :       start middle
  20 :                          {
  21 :                                  printf("nMiddle");
  22 :                                  yyclearin;
  23 :                                  return(0);
  24 :                          }
  25 :                  end postamble
  26 :          ;
  27 :  
  28 :  start
  29 :          :       /* empty */
  30 :          |       START_TOKEN
  31 :          ;
  32 :  
  33 :  middle
  34 :          :
  35 :          ;
  36 :  
  37 :  middle
  38 :          :       MID_TOKEN
  39 :          |       /* empty */
  40 :          ;
  41 :  
  42 :  %%


~~~~~~~         *18 , never occurs on rhs of rule - start rule?
~~~~~~~         *28 , 19
~~~~~~~         *33 , *37, 19
~~~~~~~         is not declared - token??, 25
~~~~~~~         is not declared - token??, 25
~~~~~~~         is not declared - token??, 30
~~~~~~~         is not declared - token??, 38

        End of X-ref
        ~~~~~~~~~~~~
 

BUGS

Should be able to understand the %token and similar directives.


 

Index

NAME
SYNOPSIS
DESCRIPTION
BUGS

This document was created by man2html, using the manual pages.
Time: 17:57:21 GMT, July 24, 2024